/*! \file creator.h
	\author HiddenSeeker

	Describes a creator clause
*/
#include "list.h"
#include "identifierstring.h"
#pragma once

class ParentData;
/*! Describes a creator node
*/
class CreatorNode: public AbstractNode
{
 private:
		 ListNode<IdentifierNode> * m_clients;
		 ListNode<IdentifierNode> * m_features;
 public:
	     inline ListNode<IdentifierNode> * clients() { return m_clients; }
		 inline ListNode<IdentifierNode> * features() { return m_features; }
	     inline CreatorNode(const YYLTYPE & pos, 
			                ListNode<IdentifierNode> * clients,
					        ListNode<IdentifierNode> * features):AbstractNode(pos)
		 {
			 m_clients=clients;
			 m_features=features;
		 }

		 void createConstructors(ParentData * parent);
		 /*! Writes a node data to stream
		 */
		 void write(GraphStream * s);
		 inline ~CreatorNode()
		 {
			 if (isOwningData())
			 {
				 delete m_clients;
				 delete m_features;
			 }
		 }
};
